﻿using System;
using System.ComponentModel.DataAnnotations;

namespace Management.Core.Workshop
{
    /// <summary>
    /// 车间
    /// </summary>
    public class Workshop
    {
        /// <summary>
        /// 车间编号
        /// </summary>
        [Key]
        public int WorkshopID { get; set; }

        /// <summary>
        /// 车间名称
        /// </summary>
        [Required(ErrorMessage = "必填")]
        [Display(Name = "车间名称")]
        public string Name { get; set; }

        /// <summary>
        /// 公司
        /// </summary>
        [Display(Name = "公司")]
        public string Company { get; set; }

        /// <summary>
        /// 制造部编号
        /// </summary>
        [Required(ErrorMessage = "必填")]
        [Display(Name = "制造部编号")]
        public int ManufacturingID { get; set; }        

        /// <summary>
        /// 子编号
        /// </summary>
        [Display(Name = "子编号")]
        public int SubID { get; set; }

        /// <summary>
        /// 禁用
        /// </summary>
        [Display(Name = "禁用")]
        public int IsDisabled { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Required(ErrorMessage = "必填")]
        [Display(Name = "创建时间")]
        public DateTime Created_at { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [Required(ErrorMessage = "必填")]
        [Display(Name = "更新时间")]
        public DateTime Updated_at { get; set; }


        public virtual Manufacturing.Manufacturing Manufacturing { get; set; }
    }
}
